const http = require('http');
const express = require('express');
const router = express.Router();

/** 本地代理优化 */
const devProxy = require('../proxy');
const isProduction = process.env.NODE_ENV !== 'development';

/**
 * 判断是否是HTML请求
 * @param {*} header
 * @param {*} options
 */
function acceptsHtml(header, options) {
    const htmlHeaders = ['text/html', 'application/xhtml'];
    for (let i = 0; i < htmlHeaders.length; i++) {
        if (header && header.indexOf(htmlHeaders[i]) > -1) {
            return true;
        }
    }
    return false;
}

module.exports = router;